home *** CD-ROM | disk | FTP | other *** search
- From: mforget@elfhaven.ersys.edmonton.ab.ca (Michel Forget)
- Subject: Re: GEM List
- Date: Sat, 30 Jul 1994 22:07:42 -0600
- Precedence: bulk
-
- Hello Evan,
-
- >vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
- >Oh, and there's another problem with app-defs... if you don't have a TSR
- >to load it (of course translate it into something useful) and put it in
- >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- >
- >Useful? It is already in a useful form! Why would you change it? Let
- >the application writer use whatever form of lookup is best. And what
- >makes you think you have to keep the whole file in memory? The application
- >will load it, make whatever hash-tables or linked lists or whatever are
- >needed, and then free the ram! Simple enough!
-
- If a TSR is written, it would be nice if it could accept an evnt_multi()
- keycode/keyboard state (kr, ks) and return a structure of the following
- format:
-
- typedef struct kc {
- int scancode;
- int ascii_code;
- int left_shift;
- int right_shift;
- int control;
- int alternate;
- int capslock;
- } keycode;
-
- That way when a program gets a keypress, it can ask the TSR to process
- it and then use the resulting value very easily. I left the structure
- format very simple, but it could be improved. I was thinking about
- using a bitfield for the last five values (save a lot of space that
- way) but what if Basic (or some language other than "C") has no support
- for bitfields? Anyway, though, it would be worth having a TSR if it
- could do something like this for the program.
-
- >What? If the information is available, use it, otherwise, not. A TSR?
- >Do you realize how many problems you'll have with that? A reboot to change
- >a program option? I think not. And with memory protection, any time
- >you use a pointer to something outside your program, you are opening the
- >way to lots of problems.
-
- True, but the problems could be worked out quite easily. A little testing
- under memory protection is all that would really be required. As for
- having to reboot, this is not exactly unheard of. All GDOS changes
- require a reboot. How do programs like ICFS get configured by CPX
- modules? One (probably bad) idea would be to have the TSR check the
- size of the APP_DEFS.SYS file every time it is asked for a key
- structure. If the size changed since the last time, reload the file
- and then respond to the request of the user. That would have very little
- overhead (but maybe too much). There are other ways, I'm sure.
-
-
- --
- Michel Forget \\ mforget@elfhaven.ersys.edmonton.ab.ca //
- Electric Storm Software \\ ess@tibalt.supernet.ab.ca //
- PGP Public Key Finger. = 1F C0 D3 FE 40 51 7F 47 F3 4A C6 AD 6E 02 71 85
-